]> dgit.raspbian.org Git - gnome-shell.git/commit
st/entry: Fix primary/secondary icon leak
authorSebastian Keller <skeller@gnome.org>
Sat, 28 Feb 2026 21:26:15 +0000 (22:26 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 2 Mar 2026 01:35:12 +0000 (01:35 +0000)
commita3c6383d7428f951394a715341cd9ecac4172b7b
tree0ab95bb6f11ff1251b4e3ee6a7472c6b9a9c5c41
parente141e117220370f81c82d58a458cc76f8ae70047
st/entry: Fix primary/secondary icon leak

_st_entry_set_icon() takes a ref when setting the primary/secondary
icon, but the ref is not removed when unsetting the icon or the entry is
destroyed.

Since clutter_actor_add_child() already adds a ref to the icon, there is
actually no need to manually add another ref. So stop doing that to fix
this leak.

This however also requires that StPasswordEntry takes ownership of its
own icon that it may set or unset multiple times. Since it is initially
floating we need to sink the ref for that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4095>
src/st/st-entry.c
src/st/st-password-entry.c